function MyToast(info)
  Toast.makeText(activity, info,Toast.LENGTH_SHORT).show()
end
function errorNetwork(code)
  MyToast(("网络错误：%s"):format(code))
end
function executeState2Toast(name,succeed)
  if succeed then
    MyToast(name.."成功")
   else
    MyToast(name.."失败")
  end
end

function AutoSetToolTip(view,text)
  if tonumber(Build.VERSION.SDK) >= 26 then
    view.setTooltipText(text)
  end
end